
var api = require('../../utils/api.js');
var app = getApp();

Page({

    /**
     * 页面的初始数据
     */
    data: {
        lists:[],
        info:[]
    },

    /**
     * 生命周期函数--监听页面加载
     */
    onShow() {
        this.getworkerinfo();
        this.getusermoneylog();
    },

    getworkerinfo(){
        var that=this;

        api.post({
            url: 'user/index',
            data: {},
            success: data => {
                that.setData({
                    info:data.data
                })

            }
        })

    },

    getusermoneylog(){
        var that=this;
        api.post({
            url: 'user/getBalance',
            data: {},
            success: data => {
                that.setData({
                    lists:data.data
                })
            }
        })
    },

    tixian(){
        wx.navigateTo({
          url: '/pages/work/moneyget',
        })
    }
})